package cloud.demarcia.crawler3.entities;

import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.stereotype.Component;

import java.net.MalformedURLException;
import java.net.URL;

@Data
@Component
@NoArgsConstructor
public class Page {
    private URL url;
    private String processor;

    public Page(URL url, String processor) {
        this.url = url;
        this.processor = processor;
    }

    public Page(String urlString, String processor) throws MalformedURLException {
        this.url = new URL(urlString);
        this.processor = processor;
    }

}
